c#:从这段这符"mp3\DJ音效\爱的勇气.mp3"中提取出:爱的勇气,代码如何写呢?
来源:百度知道 编辑:UC知道 时间:2024/06/08 10:50:30
我想从这段这符"mp3\DJ音效\爱的勇气.mp3"中提取出:爱的勇气,代码如何写呢?
谢谢!!
谢谢!!
string str = @"mp3\DJ音效\爱的勇气.mp3";
int pos1 = str.LastIndexOf(@"\");
int pos2 = str.IndexOf(".");
string mp3Name = str.Substring(pos1 + 1, pos2 - pos1 - 1);
string strSentence = @"mp3\DJ音效\爱的勇气.mp3";//The goal string'
string[] strArr = strSentence.Split('\\'); //split by \,and saved to string[]
string strTemp = string.Empty; //save the goal
for (int i = 0; i <= strArr.Length - 1; i++)
{
if (strArr[i].Substring (0,5).Equals ("爱的勇气"))
{
strTemp = strArr[i].Substring (0,5);
}
}
string s = "mp3\DJ音效\爱的勇气.mp3";
int start = s.LastIndexOf(@"\");
int end = s.LastIndexOf(@".");
string s2 = s.SubString(start, end - start);
string path = @"mp3\DJ音效\爱的勇气.mp3";
pat
C盘空间为何变动从500M至100M
谁知道在photon shop cs2金色"C M Y K"
"Drivers"是什么文件夹?占了C盘260多M的空间!
response.write("从一加到100结果等于:"&c&"")代码中
"M"是什么意思
1.There's ( )"a" in the word "map".A.an.B.a C.the 2.There's( )"m" in the word "map".A.an.B.a.C.th
打开photoshop后,C盘的可用空间为什么从4G变为300多M
编写一个C程序,判断从键盘输入的一个数M是否是素数。
C语言从键盘输入两个正整数m和n,求最大公约数和最小公倍数
质量为m的自行车运动员从B到C的过程中,经BC圆弧